import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/home',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children: [
                //***校园管理
                //教师管理
                {
                    path: '/teacherManage',
                    component: resolve => require(['../components/campusManage/teacher/teacherManage.vue'], resolve)
                },
                {
                    path: '/addTeacher',
                    component: resolve => require(['../components/campusManage/teacher/addTeacher.vue'], resolve)
                },
                {
                    path: '/editClass',
                    component: resolve => require(['../components/campusManage/teacher/editClass.vue'], resolve)
                },
                // 学生管理
                {
                    path: '/studentManage',
                    component: resolve => require(['../components/campusManage/student/studentManage.vue'], resolve)
                },
                //编辑学生
                {
                    path: '/editStudent',
                    component: resolve => require(['../components/campusManage/student/editStudent.vue'], resolve)
                },
                //点名管理
                {
                    path: '/teacherList',
                    component: resolve => require(['../components/campusManage/rollCall/teacherList.vue'], resolve)
                },
                {
                    path: '/stuList',
                    component: resolve => require(['../components/campusManage/rollCall/stuList.vue'], resolve)
                },
                {
                    path: '/rollCallDet',
                    component: resolve => require(['../components/campusManage/rollCall/rollCallDet.vue'], resolve)
                },
                //院系管理
                {
                    path: '/departManage',
                    component: resolve => require(['../components/campusManage/department/departManage.vue'], resolve)
                },
                {
                    path: '/classList',
                    component: resolve => require(['../components/campusManage/department/classList.vue'], resolve)
                },
                {
                    path: '/editAdminClass',
                    component: resolve => require(['../components/campusManage/department/editAdminClass.vue'], resolve)
                },
                // 系统公告
                {
                    path: '/announcement',
                    component: resolve => require(['../components/campusManage/announcement/annoManage.vue'], resolve)
                },
                {
                    path: '/annoDetail',
                    component: resolve => require(['../components/campusManage/announcement/annoDetail.vue'], resolve)
                },
                {
                    path: '/newAnno',
                    component: resolve => require(['../components/campusManage/announcement/newAnno.vue'], resolve)
                },

                //***课外运动管理
                // 成绩管理
                {
                    path: '/scoreManage',
                    component: resolve => require(['../components/outClassManage/score/scoreManage.vue'], resolve)
                },
                {
                    path: '/scoreDetail',
                    component: resolve => require(['../components/outClassManage/score/scoreDetail.vue'], resolve)
                },
                // 成绩导出
                {
                    path: '/scoreImport',
                    component: resolve => require(['../components/outClassManage/scoreImport/scoreImport.vue'], resolve)
                },
                // 运动设置
                {
                    path: '/sportConfig',
                    component: resolve => require(['../components/outClassManage/sportConfig/sportConfig.vue'], resolve)
                },
                // 编辑运动设置
                {
                    path: '/newConfig',
                    component: resolve => require(['../components/outClassManage/sportConfig/newConfig.vue'], resolve)
                },
                // 学习目标设定
                {
                    path: '/semesterTarget',
                    component: resolve => require(['../components/outClassManage/semesterTarget/semesterTarget.vue'], resolve)
                },
                {
                    path: '/newSemTarget',
                    component: resolve => require(['../components/outClassManage/semesterTarget/newSemTarget.vue'], resolve)
                },
                //跑步管理
                {
                    path: '/runManage',
                    component: resolve => require(['../components/outClassManage/runManage/runManage.vue'], resolve)
                },
                //跑步详情
                {
                    path: '/runDetail',
                    component: resolve => require(['../components/outClassManage/runManage/runDetail.vue'], resolve)
                },
                // 作弊管理
                {
                    path: '/cheatManage',
                    component: resolve => require(['../components/outClassManage/cheatCharts/cheatManage.vue'], resolve)
                },
                {
                    path: '/cheatDetail', //作弊详情
                    component: resolve => require(['../components/outClassManage/cheatCharts/cheatDetail.vue'], resolve)
                },
                //***体测预约
                {
                    path: '/history',
                    component: resolve => require(['../components/physicalTest/testAppointment/history.vue'], resolve)
                },
                //导入预约文件
                {
                    path: '/importFile',
                    component: resolve => require(['../components/physicalTest/testAppointment/importFile.vue'], resolve)
                },
                // 导入学生数据
                {
                    path: '/importStudent',
                    component: resolve => require(['../components/physicalTest/testAppointment/importStudent.vue'], resolve)
                },
                {
                    path: '/importStuResult',
                    component: resolve => require(['../components/physicalTest/testAppointment/importStuResult.vue'], resolve)
                },
                //预约数据
                {
                    path: '/reservationData',
                    component: resolve => require(['../components/physicalTest/testAppointment/reservationData.vue'], resolve)
                },
                //新增项目
                {
                    path: '/newProgect',
                    component: resolve => require(['../components/physicalTest/testAppointment/newProgect.vue'], resolve)
                },
                //***新增和编辑体测
                {
                    path: '/newTest',
                    component: resolve => require(['../components/physicalTest/testAppointment/newTest.vue'], resolve)
                },
                //体测管理&成绩管理
                {
                    path: '/test_scoreManage',
                    component: resolve => require(['../components/physicalTest/scoreManage/scoreManage.vue'], resolve)
                },
                {
                    path: '/test_scoreDetail',//成绩详情
                    component: resolve => require(['../components/physicalTest/scoreManage/scoreDetail.vue'], resolve)
                },
                {
                    path: '/test_newScore',//新增成绩
                    component: resolve => require(['../components/physicalTest/scoreManage/newScore.vue'], resolve)
                },
                {
                    path: '/test_scoreImport',//导入成绩
                    component: resolve => require(['../components/physicalTest/scoreManage/scoreImport.vue'], resolve)
                },
                {
                    path: '/test_importResult',//导入结果
                    component: resolve => require(['../components/physicalTest/scoreManage/importResult.vue'], resolve)
                },
                //***场馆管理
                {
                    path: '/venueManage',
                    component: resolve => require(['../components/venueManage/venueManage/venueManage.vue'], resolve)
                },
                //新增/编辑场馆
                {
                    path: '/newVenue',
                    component: resolve => require(['../components/venueManage/venueManage/newVenue.vue'], resolve)
                },
                //场馆详情
                {
                    path: '/venueDetail',
                    component: resolve => require(['../components/venueManage/venueManage/venueDetail.vue'], resolve)
                },
                //节假日设置
                {
                    path: '/holidayConfig',
                    component: resolve => require(['../components/venueManage/venueManage/holidayConfig.vue'], resolve)
                },
                //***场地管理
                {
                    path: '/fieldManage',
                    component: resolve => require(['../components/venueManage/venueManage/fieldManage.vue'], resolve)
                },
                //新增/编辑场地
                {
                    path: '/newField',
                    component: resolve => require(['../components/venueManage/venueManage/newField.vue'], resolve)
                },
                //价格设置
                {
                    path: '/priceConfig',
                    component: resolve => require(['../components/venueManage/venueManage/priceConfig.vue'], resolve)
                },
                //***用户管理
                {
                    path: '/userManage',
                    component: resolve => require(['../components/venueManage/userManage/userManage.vue'], resolve)
                },
                //***订单管理
                {
                    path: '/orderManage',
                    component: resolve => require(['../components/venueManage/orderManage/orderManage.vue'], resolve)
                },
                {
                    path: '/orderDetail',
                    component: resolve => require(['../components/venueManage/orderManage/orderDetail.vue'], resolve)
                },
                //***出入场管理
                {
                    path: '/outInVenueManage',
                    component: resolve => require(['../components/venueManage/outInVenueManage/outInVenueManage.vue'], resolve)
                },
                //***考勤管理
                {
                    path: '/attendanceManage',
                    component: resolve => require(['../components/attendanceManage/attendanceRecord/attendanceManage.vue'], resolve)
                },
                // 考勤记录
                {
                    path: '/attendanceDetail',
                    component: resolve => require(['../components/attendanceManage/attendanceRecord/attendanceDetail.vue'], resolve)
                },
                // 班级完成率
                {
                    path: '/classComplete',
                    component: resolve => require(['../components/attendanceManage/attendanceRecord/classComplete.vue'], resolve)
                },
                // 考勤设置
                {
                    path: '/setAttendance',
                    component: resolve => require(['../components/attendanceManage/attendanceSetting/setAttendance.vue'], resolve)
                },
                {
                    path: '/newAttendance',
                    component: resolve => require(['../components/attendanceManage/attendanceSetting/newAttendance.vue'], resolve)
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/login/Login.vue'], resolve)
        },
        {
            path: '/502',
            component: resolve => require(['../components/common/502.vue'], resolve)
        },
        {
            path: '/scoreImportRecord',
            component: resolve => require(['../components/outClassManage/scoreImport/scoreImportRecord.vue'], resolve)
        },
        // 出入记录
        {
            path: '/outInRecord',
            component: resolve => require(['../components/venueManage/outInVenueManage/outInRecord.vue'], resolve)
        },
        //评分标准
        {
            path: '/standards',
            component: resolve => require(['../components/physicalTest/standards.vue'], resolve)
        },
        //数据统计
        {
            path: '/dataStatistics',
            component: resolve => require(['../components/physicalTest/dataStatistics.vue'], resolve)
        },
        // 学期管理
        {
            path: '/semesterManage',
            component: resolve => require(['../components/campusManage/semester/semesterManage.vue'], resolve)
        },
        {
            path: '/newSemester',
            component: resolve => require(['../components/campusManage/semester/newSemester.vue'], resolve)
        },
        // 数据分析
        {
            path: '/realTime',
            component: resolve => require(['../components/dataPlatform/realTime.vue'], resolve)
        },
        {
            path: '/sportAnalysis',
            component: resolve => require(['../components/dataPlatform/sportAnalysis.vue'], resolve)
        },
        {
            path: '/sportTrend',
            component: resolve => require(['../components/dataPlatform/sportTrend.vue'], resolve)
        },
        {
            path: '/userAnalysis',
            component: resolve => require(['../components/dataPlatform/userAnalysis.vue'], resolve)
        },
    ]
})
